package zap

import (
	"gitee.com/mkwchecking/sr-core/log/ilog"
	"go.uber.org/zap/zapcore"
)

func zapLevel(level ilog.Level) zapcore.Level {
	switch level {
	case ilog.DebugLevel:
		return zapcore.DebugLevel
	case ilog.InfoLevel:
		return zapcore.InfoLevel
	case ilog.WarnLevel:
		return zapcore.WarnLevel
	case ilog.ErrorLevel:
		return zapcore.ErrorLevel
	case ilog.FatalLevel:
		return zapcore.FatalLevel
	case ilog.PanicLevel:
		return zapcore.PanicLevel
	default:
		return zapcore.InfoLevel
	}
}
